Optimal. Leaf size=43 \[ -\frac {c}{a x}-\frac {(b c-a d) \log (x)}{a^2}+\frac {(b c-a d) \log (a+b x)}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {78}
\begin {gather*} -\frac {\log (x) (b c-a d)}{a^2}+\frac {(b c-a d) \log (a+b x)}{a^2}-\frac {c}{a x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rubi steps
\begin {align*} \int \frac {c+d x}{x^2 (a+b x)} \, dx &=\int \left (\frac {c}{a x^2}+\frac {-b c+a d}{a^2 x}-\frac {b (-b c+a d)}{a^2 (a+b x)}\right ) \, dx\\ &=-\frac {c}{a x}-\frac {(b c-a d) \log (x)}{a^2}+\frac {(b c-a d) \log (a+b x)}{a^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 42, normalized size = 0.98 \begin {gather*} -\frac {c}{a x}+\frac {(-b c+a d) \log (x)}{a^2}+\frac {(b c-a d) \log (a+b x)}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 44, normalized size = 1.02
method | result | size |
default | \(-\frac {\left (a d -b c \right ) \ln \left (b x +a \right )}{a^{2}}-\frac {c}{a x}+\frac {\left (a d -b c \right ) \ln \left (x \right )}{a^{2}}\) | \(44\) |
norman | \(-\frac {\left (a d -b c \right ) \ln \left (b x +a \right )}{a^{2}}-\frac {c}{a x}+\frac {\left (a d -b c \right ) \ln \left (x \right )}{a^{2}}\) | \(44\) |
risch | \(-\frac {c}{a x}+\frac {\ln \left (-x \right ) d}{a}-\frac {\ln \left (-x \right ) b c}{a^{2}}-\frac {\ln \left (b x +a \right ) d}{a}+\frac {\ln \left (b x +a \right ) b c}{a^{2}}\) | \(55\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 43, normalized size = 1.00 \begin {gather*} \frac {{\left (b c - a d\right )} \log \left (b x + a\right )}{a^{2}} - \frac {{\left (b c - a d\right )} \log \left (x\right )}{a^{2}} - \frac {c}{a x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.41, size = 41, normalized size = 0.95 \begin {gather*} \frac {{\left (b c - a d\right )} x \log \left (b x + a\right ) - {\left (b c - a d\right )} x \log \left (x\right ) - a c}{a^{2} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 95 vs.
\(2 (34) = 68\).
time = 0.18, size = 95, normalized size = 2.21 \begin {gather*} - \frac {c}{a x} + \frac {\left (a d - b c\right ) \log {\left (x + \frac {a^{2} d - a b c - a \left (a d - b c\right )}{2 a b d - 2 b^{2} c} \right )}}{a^{2}} - \frac {\left (a d - b c\right ) \log {\left (x + \frac {a^{2} d - a b c + a \left (a d - b c\right )}{2 a b d - 2 b^{2} c} \right )}}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.48, size = 51, normalized size = 1.19 \begin {gather*} -\frac {{\left (b c - a d\right )} \log \left ({\left | x \right |}\right )}{a^{2}} - \frac {c}{a x} + \frac {{\left (b^{2} c - a b d\right )} \log \left ({\left | b x + a \right |}\right )}{a^{2} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.33, size = 33, normalized size = 0.77 \begin {gather*} -\frac {c}{a\,x}-\frac {2\,\mathrm {atanh}\left (\frac {2\,b\,x}{a}+1\right )\,\left (a\,d-b\,c\right )}{a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________